package qj.util;

import java.io.UnsupportedEncodingException;

public class EncodeUtil {
    public static byte[] encode(String str, String charsetName) {
        try {
            return str.getBytes(charsetName);
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
}
